<template>
  <el-table
    ref="multipleTable"
    :data="tableData"
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange"
  >
    <el-table-column type="selection" width="55"> </el-table-column>

    <el-table-column prop="id" label="报销编号" width="200"> </el-table-column>
    <el-table-column prop="budgetitemName" label="报销科目" width="200">
    </el-table-column>
    <el-table-column prop="specialMoney" label="专项报销金额(元)" width="200">
    </el-table-column>
    <el-table-column prop="supportMoney" label="配套报销金额(元)" width="200">
    </el-table-column>
    <el-table-column prop="dealWithPerson" label="经手人" width="200">
    </el-table-column>
    <el-table-column prop="schedule" label="审核进度" width="200">
    </el-table-column>
    <el-table-column fixed="right" label="操作" width="300">
      <el-button type="text" size="small"> 打印审批单 </el-button>
      <el-button type="text" size="small"> 详情 </el-button>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  data() {
    return {
      tableData: [],
      multipleSelection: [],
    };
  },
  created() {
    this.Show();
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    Show() {
      this.http
        .get("api/tb_project_expensebaseinfo/expensebaseinfoList")
        .then((res) => {
          this.tableData = res.data;
        });
    },
  },
};
</script>